﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	mc:Ignorable="d" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
	xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
	xmlns:il="clr-namespace:Microsoft.Expression.Interactivity.Layout;assembly=Microsoft.Expression.Interactions" 
	xmlns:n="http://nRoute/schemas/2010/xaml"
	xmlns:Orktane_Samples_Sudoku_Behaviors="clr-namespace:nRoute.Samples.Sudoku.Behaviors;assembly=nRoute.Samples.Sudoku.Common" 
	xmlns:Orktane_Samples_Sudoku_Controls="clr-namespace:nRoute.Samples.Sudoku.Controls" 
	x:Class="nRoute.Samples.Sudoku.Views.GameView" 
    d:DesignWidth="420" d:DesignHeight="550" Width="420" Height="550">
    
	<UserControl.Resources>
        
        <!-- BRUSHES -->
		<LinearGradientBrush x:Key="BoxLightGreyBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FFEAEAEA" Offset="0.091"/>
			<GradientStop Color="#FFB5B5B5" Offset="0.983"/>
			<GradientStop Color="White"/>
			<GradientStop Color="#FFD2D2D2" Offset="0.954"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="LightBlueBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FFDFE8FF" Offset="0.041"/>
			<GradientStop Color="#FF92B7FE" Offset="1"/>
			<GradientStop Color="White"/>
			<GradientStop Color="#FFB2D0F4" Offset="0.922"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="GradientLightGreyBrush" EndPoint="0.5,1" StartPoint="0.5,0">
				<GradientStop Color="#FF8C9EB6" Offset="0.477"/>
				<GradientStop Color="#FF6D86A5" Offset="1"/>
				<GradientStop Color="#FFB0BCCA"/>
				<GradientStop Color="#FF7E92AD" Offset="0.536"/>
			</LinearGradientBrush>
		<LinearGradientBrush x:Key="LightBlueBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
				<GradientStop Color="#FF7A8D9C" Offset="0.012"/>
				<GradientStop Color="#FF33526F" Offset="0.988"/>
			</LinearGradientBrush>
		<LinearGradientBrush x:Key="BlackGradientBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="Black" Offset="0.525"/>
			<GradientStop Offset="0.996" Color="#FF202020"/>
			<GradientStop Color="#E06A6A6A"/>
			<GradientStop Color="#FF161515" Offset="0.405"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="GradientLightGreyBrush2" EndPoint="0.5,1" StartPoint="0.5,0">
				<GradientStop Color="#FF7A93B4" Offset="0.477"/>
				<GradientStop Color="#FF5B7496" Offset="0.987"/>
				<GradientStop Color="#FFB6BFD0"/>
				<GradientStop Color="#FF6885AC" Offset="0.517"/>
			</LinearGradientBrush>
		<LinearGradientBrush x:Key="ButtonBorderBrush" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF4773AF" Offset="0.062"/>
			<GradientStop Color="#FF2F4D72" Offset="0.494"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="ButtonBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
			<GradientStop Color="#FF496D9D" Offset="0.519"/>
			<GradientStop Color="#FF5E7BA7" Offset="0.465"/>
			<GradientStop Color="#FF9CB3D6"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="GreyLinedBkgBrush" EndPoint="0,0" StartPoint="9,0" SpreadMethod="Repeat" MappingMode="Absolute">
			<GradientStop Color="#FFDDEBFF" Offset="0.083"/>
			<GradientStop Color="#FFC6CDD5" Offset="0.136"/>
			<GradientStop Color="#FFC6CDD5" Offset="0.029"/>
		</LinearGradientBrush>
        <LinearGradientBrush x:Key="BrushLightBlueBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFAEB4C5" Offset="0.041"/>
            <GradientStop Color="#FF848484" Offset="1"/>
            <GradientStop Color="White"/>
            <GradientStop Color="#FFC9D4EC" Offset="0.922"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="RedBrushBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFF08A8A" Offset="0.041"/>
            <GradientStop Color="#FF8C2020" Offset="1"/>
            <GradientStop Color="White"/>
            <GradientStop Color="#FFFF3030" Offset="0.921"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="GreenBrushBkgBrush" EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FFB7CE51" Offset="0.041"/>
            <GradientStop Color="#FF63702D" Offset="1"/>
            <GradientStop Color="White"/>
            <GradientStop Color="#FF9DB924" Offset="0.909"/>
        </LinearGradientBrush>

        <!-- COMPONENTS -->
		<n:CommandRelay x:Key="SetBoxValueCommandRelay" />
		<n:ValueConverterRelay x:Key="BoxValueConverterRelay" />
		<n:ValueConverterRelay x:Key="IsPredefineConverterRelay" />
		<n:ValueConverterRelay x:Key="IsNotPredefineConverterRelay" />
		<n:ValueConverterRelay x:Key="TitleConverterRelay" />
		
        <!-- STORYBOARDS -->
		<Storyboard x:Name="ShowMessageStoryboard">
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="messageBorder" 
                Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.00" Storyboard.TargetName="border" 
                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1.1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.00" Storyboard.TargetName="border" 
                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1.1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="00:00:00.7000000" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="messageBorder" 
                Storyboard.TargetProperty="(UIElement.Opacity)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuarticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="HideMessageStoryboard">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" 
                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.8">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border" 
                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.8">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="messageBorder" 
                Storyboard.TargetProperty="(UIElement.Opacity)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="messageBorder" 
                Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00.5000000">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="ShowBoxValueStoryboard">
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" 
                Storyboard.TargetName="boxValueBorder" Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.00" Storyboard.TargetName="border1" 
                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.05">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00.00" Storyboard.TargetName="border1" 
                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.1000000" Value="1.05">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
				<EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="boxValueBorder" 
                Storyboard.TargetProperty="(UIElement.Opacity)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuarticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Name="HideBoxValueStoryboard">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border1" 
                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.8">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="border1" 
                Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.8">
					<EasingDoubleKeyFrame.EasingFunction>
						<QuinticEase EasingMode="EaseInOut"/>
					</EasingDoubleKeyFrame.EasingFunction>
				</EasingDoubleKeyFrame>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="boxValueBorder" 
                Storyboard.TargetProperty="(UIElement.Opacity)">
				<EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="boxValueBorder" 
                Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00.3000000">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Collapsed</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
		
	</UserControl.Resources>
    
    <!-- BEHAVIOURS -->
	<i:Interaction.Behaviors>
		<n:BridgeViewModelBehavior/>
		<n:BridgeCommandBehavior 
			CommandRelay="{StaticResource SetBoxValueCommandRelay}"
			CommandSource="{Binding SetBoxValueCommand, Mode=OneWay}"/>
	</i:Interaction.Behaviors>
    
    <!-- ROOT -->
	<Grid x:Name="LayoutRoot" Clip="M0,8 C0,3.581722 3.581722,0 8,0 L412,0 C416.41827,0 420,3.581722 420,8 L420,542 C420,546.41827 416.41827,550 412,550 L8,550 C3.581722,550 0,546.41827 0,542 z" Background="{StaticResource GreyLinedBkgBrush}">
        
        <!-- VISUAL STATES -->
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="ScreenStateGroup" ic:ExtendedVisualStateManager.UseFluidLayout="True">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="00:00:00.6000000">
						<VisualTransition.GeneratedEasingFunction>
							<QuarticEase EasingMode="EaseInOut"/>
						</VisualTransition.GeneratedEasingFunction>
					</VisualTransition>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="HomeScreenState"/>
				<VisualState x:Name="GameScreenState">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="MenuGrid"
                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="-420"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="GameGrid"
                            Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<VisualStateManager.CustomVisualStateManager>
			<ic:ExtendedVisualStateManager/>
		</VisualStateManager.CustomVisualStateManager>
        
        <!-- REVERSE TRIGGER -->
		<i:Interaction.Triggers>
			<n:ReverseCommandTrigger ReverseCommand="{Binding ViewBoardReverseCommand, Mode=OneWay}">
				<ic:GoToStateAction StateName="GameScreenState"/>
			</n:ReverseCommandTrigger>
		</i:Interaction.Triggers>
        
        <!-- GAME SCREEN -->
		<Grid x:Name="GameGrid" RenderTransformOrigin="0.5,0.5">
			<Grid.RowDefinitions>
				<RowDefinition Height="55"/>
				<RowDefinition/>
				<RowDefinition Height="55"/>
			</Grid.RowDefinitions>
			<Grid.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform X="420"/>
				</TransformGroup>
			</Grid.RenderTransform>
            
            <!-- TOP PANEL -->
			<Rectangle Fill="{StaticResource GradientLightGreyBrush}" StrokeThickness="0"/>
                        
			<Grid Height="36" Margin="16,0">
				<TextBlock HorizontalAlignment="Center" Margin="15,0" VerticalAlignment="Center" FontFamily="Arial" 
                    FontSize="26.667" Foreground="White"  TextWrapping="Wrap"
                    Text="{Binding Game.Level, Converter={StaticResource TitleConverterRelay}, Mode=OneWay}">
					<TextBlock.Effect>
						<DropShadowEffect BlurRadius="1" Color="#FF48494B" ShadowDepth="1"/>
					</TextBlock.Effect>
				</TextBlock>
				<Border BorderThickness="1,1,1,1.5" BorderBrush="{StaticResource ButtonBorderBrush}" 
                        Background="{StaticResource ButtonBkgBrush}" CornerRadius="4" HorizontalAlignment="Left" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonDown">
							<ic:GoToStateAction StateName="HomeScreenState"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<Grid Margin="0,0,0,1">
						<TextBlock HorizontalAlignment="Center" Margin="10,0,15,0" VerticalAlignment="Center" FontFamily="Arial" 
                                   FontSize="18.667" Foreground="White" Text="Back" TextWrapping="Wrap">
							<TextBlock.Effect>
								<DropShadowEffect BlurRadius="1" Color="#FF040608" ShadowDepth="1"/>
							</TextBlock.Effect>
						</TextBlock>
						<Path Fill="{StaticResource ButtonBkgBrush}" Stretch="Fill" Stroke="{StaticResource ButtonBorderBrush}"
                            HorizontalAlignment="Left" Margin="-11,0,0,0" Width="12.031" UseLayoutRounding="False" 
                            Data="M377.27414,38.493122 L388.34219,22.201729 L376.75092,6.1691985" Height="32.216" 
                              VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
							<Path.RenderTransform>
								<TransformGroup>
									<ScaleTransform ScaleX="-1"/>
									<SkewTransform AngleX="0" AngleY="0"/>
									<RotateTransform Angle="0"/>
									<TranslateTransform/>
								</TransformGroup>
							</Path.RenderTransform>
						</Path>
					</Grid>
				</Border>
			</Grid>
            
            <!-- BOARD PANEL -->
			<Border Grid.Row="1" BorderThickness="2" Background="#FFF4F4F4" BorderBrush="#FF8BB4FE">
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition/>
						<RowDefinition/>
						<RowDefinition/>
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition/>
						<ColumnDefinition/>
						<ColumnDefinition/>
					</Grid.ColumnDefinitions>
					
                    <!-- ITEMS CONTROL -->
					<ItemsControl Grid.ColumnSpan="3" Grid.RowSpan="3" ItemsSource="{Binding Game.Board, Mode=OneWay}">
						
                        <!-- PANEL TEMPLATE -->
						<ItemsControl.ItemsPanel>
							<ItemsPanelTemplate>
								<Grid>
									<Grid.RowDefinitions>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
										<RowDefinition/>
									</Grid.RowDefinitions>
									<Grid.ColumnDefinitions>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
										<ColumnDefinition/>
									</Grid.ColumnDefinitions>
								</Grid>
							</ItemsPanelTemplate>
						</ItemsControl.ItemsPanel>
                        
                        <!-- ITEM TEMPLATE -->
						<ItemsControl.ItemTemplate>
							<DataTemplate>
								<Grid>
                                    
                                    <!-- POSITION BEHAVIOR -->
									<i:Interaction.Behaviors>
										<Orktane_Samples_Sudoku_Behaviors:SetParentGridPosBehavior 
											Col="{Binding Row, Mode=OneWay}" 
											Row="{Binding Col, Mode=OneWay}" />
									</i:Interaction.Behaviors>
                                    
                                    <!-- GREY'ISH/PREDEFINED BORDER -->
									<Border Background="{StaticResource BoxLightGreyBkgBrush}" BorderBrush="#FF909090" 
										BorderThickness="0,0,0.5,0.5" 
                                            Visibility="{Binding Converter={StaticResource IsPredefineConverterRelay}}">
										<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" 
											Text="{Binding ExpectedValue, Converter={StaticResource BoxValueConverterRelay}, Mode=OneWay}">
											<TextBlock.Foreground>
												<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
													<GradientStop Color="#FFAFA0A0" Offset="1"/>
													<GradientStop Color="#FFD2D2D2" Offset="0.062"/>
												</LinearGradientBrush>
											</TextBlock.Foreground>
										</TextBlock>
									</Border>
                                    
                                    <!-- BLUE'ISH/USER-DEFINED BORDER -->
									<Border Background="{StaticResource LightBlueBkgBrush}" Cursor="Hand"
										Visibility="{Binding Converter={StaticResource IsNotPredefineConverterRelay}}"
										BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5">
										<i:Interaction.Triggers>
											<i:EventTrigger EventName="MouseLeftButtonUp">
												<n:ExecuteCommandAction Command="{StaticResource SetBoxValueCommandRelay}"
													Parameter="{Binding ''}"/>
											</i:EventTrigger>
										</i:Interaction.Triggers>
										<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="32" 
											Text="{Binding SuggestedValue, Converter={StaticResource BoxValueConverterRelay}, Mode=OneWay}">
											<TextBlock.Foreground>
												<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
													<GradientStop Color="#FF3B5C88" Offset="0.574"/>
													<GradientStop Color="#FF3389C3"/>
												</LinearGradientBrush>
											</TextBlock.Foreground>
										</TextBlock>
									</Border>
								</Grid>
							</DataTemplate>
						</ItemsControl.ItemTemplate>
					</ItemsControl>
					
					<!-- TOP LINES -->
					<Path Stretch="Fill" Stroke="#FF8BB4FE" StrokeThickness="3" HorizontalAlignment="Right" Width="3" 
                          UseLayoutRounding="False" Grid.RowSpan="3" Data="M126,11 L126,314.0264" d:IsLocked="True"/>
					<Path Stretch="Fill" Stroke="#FF8BB4FE" StrokeThickness="3" HorizontalAlignment="Right" Width="3" 
                          UseLayoutRounding="False" Grid.Column="1" Grid.RowSpan="3" Data="M126,11 L126,314.0264" d:IsLocked="True"/>
					<Path Stretch="Fill" Stroke="#FF82A5E4" StrokeThickness="3" Height="3" VerticalAlignment="Bottom" 
                          UseLayoutRounding="False" Grid.ColumnSpan="3" Data="M23,152 L413.18457,152" d:IsLocked="True"/>
					<Path Stretch="Fill" Stroke="#FF82A5E4" StrokeThickness="3" Height="3" VerticalAlignment="Bottom" 
                          UseLayoutRounding="False" Grid.ColumnSpan="3" Grid.Row="1" Data="M23,152 L413.18457,152" d:IsLocked="True"/>
				</Grid>
			</Border>
            
            <!-- BOTTOM PANEL -->
			<Rectangle Grid.Row="2" Fill="{StaticResource GradientLightGreyBrush2}" StrokeThickness="0" />
			<StackPanel Height="36" Margin="12,0" Grid.Row="2" Orientation="Horizontal">
                
                <!-- CONFIRM BUTTON -->
				<Border BorderThickness="1,1,1,1.5" BorderBrush="{StaticResource ButtonBorderBrush}" 
                        Background="{StaticResource ButtonBkgBrush}" CornerRadius="4" Cursor="Hand" Margin="8,0,15,0">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding ConfirmCommand, Mode=OneWay}"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock HorizontalAlignment="Center" Margin="15,0" VerticalAlignment="Center" FontFamily="Arial" 
                               FontSize="18.667" Foreground="White" Text="Confirm" TextWrapping="Wrap">
						<TextBlock.Effect>
							<DropShadowEffect BlurRadius="1" Color="#FF040608" ShadowDepth="1"/>
						</TextBlock.Effect>
					</TextBlock>
				</Border>
                
                <!-- HINT BUTTON -->
				<Border BorderThickness="1,1,1,1.5" BorderBrush="{StaticResource ButtonBorderBrush}" 
                        Background="{StaticResource ButtonBkgBrush}" Margin="0,0,15,0" CornerRadius="4" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding HintCommand, Mode=OneWay}"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock HorizontalAlignment="Center" Margin="15,0" VerticalAlignment="Center" FontFamily="Arial" 
                               FontSize="18.667" Foreground="White" Text="Hint" TextWrapping="Wrap" d:LayoutOverrides="Height">
						<TextBlock.Effect>
							<DropShadowEffect BlurRadius="1" Color="#FF040608" ShadowDepth="1"/>
						</TextBlock.Effect>
					</TextBlock>
				</Border>
                
                <!-- RESTART BUTTON -->
				<Border BorderThickness="1,1,1,1.5" BorderBrush="{StaticResource ButtonBorderBrush}" 
                     Background="{StaticResource ButtonBkgBrush}" Margin="0,0,15,0" CornerRadius="4" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding ResetCommand, Mode=OneWay}"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock HorizontalAlignment="Center" Margin="15,0" VerticalAlignment="Center" FontFamily="Arial" 
                               FontSize="18.667" Foreground="White" Text="Restart" TextWrapping="Wrap">
						<TextBlock.Effect>
							<DropShadowEffect BlurRadius="1" Color="#FF040608" ShadowDepth="1"/>
						</TextBlock.Effect>
					</TextBlock>
				</Border>
                
                <!-- SOLVE BUTTON -->
				<Border BorderThickness="1,1,1,1.5" BorderBrush="{StaticResource ButtonBorderBrush}" 
                        Background="{StaticResource ButtonBkgBrush}" Margin="0,0,15,0" CornerRadius="4" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding SolveCommand, Mode=OneWay}"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock HorizontalAlignment="Center" Margin="15,0" VerticalAlignment="Center" FontFamily="Arial" 
                               FontSize="18.667" Foreground="White" Text="Solve" TextWrapping="Wrap">
						<TextBlock.Effect>
							<DropShadowEffect BlurRadius="1" Color="#FF040608" ShadowDepth="1"/>
						</TextBlock.Effect>
					</TextBlock>
				</Border>
			</StackPanel>
		</Grid>
		
        <!-- HOME SCREEN -->
		<Grid x:Name="MenuGrid" RenderTransformOrigin="0.5,0.5">
			<Grid.RowDefinitions>
				<RowDefinition Height="55"/>
				<RowDefinition/>
			</Grid.RowDefinitions>
			<Grid.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</Grid.RenderTransform>
            
            <!-- TOP PANEL -->
			<Rectangle Fill="{StaticResource GradientLightGreyBrush}" StrokeThickness="0"/>
            
			<Grid Height="36" Margin="16,10,16,9">
				<TextBlock HorizontalAlignment="Center" Margin="15,0" VerticalAlignment="Center" FontFamily="Arial" 
                           FontSize="26.667" Foreground="White" Text="Sudoku" TextWrapping="Wrap">
					<TextBlock.Effect>
						<DropShadowEffect BlurRadius="1" Color="#FF48494B" ShadowDepth="1"/>
					</TextBlock.Effect>
				</TextBlock>
                
                <!-- GAME DIRECTION BUTTON -->
				<Border BorderThickness="1,1,1,1.5" BorderBrush="{StaticResource ButtonBorderBrush}" 
                        Background="{StaticResource ButtonBkgBrush}" CornerRadius="4" HorizontalAlignment="Right" Cursor="Hand">
					<i:Interaction.Behaviors>
						<n:NullValueVisibilityBehavior Value="{Binding Game, Mode=OneWay}"/>
					</i:Interaction.Behaviors>
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<ic:GoToStateAction StateName="GameScreenState"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<Grid Margin="0,0,0,1">
						<TextBlock HorizontalAlignment="Center" Margin="15,0,10,0" VerticalAlignment="Center" FontFamily="Arial" 
                                   FontSize="18.667" Foreground="White" Text="Game" TextWrapping="Wrap">
							<TextBlock.Effect>
								<DropShadowEffect BlurRadius="1" Color="#FF040608" ShadowDepth="1"/>
							</TextBlock.Effect>
						</TextBlock>
						<Path Fill="{StaticResource ButtonBkgBrush}" Stretch="Fill" Stroke="{StaticResource ButtonBorderBrush}"
                              HorizontalAlignment="Right" Margin="0,0,-11,0" Width="12.031" UseLayoutRounding="False" 
                              Data="M377.27414,38.493122 L388.34219,22.201729 L376.75092,6.1691985" Height="32.216" 
                              VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
							<Path.RenderTransform>
								<TransformGroup>
									<ScaleTransform/>
									<SkewTransform AngleX="0" AngleY="0"/>
									<RotateTransform Angle="0"/>
									<TranslateTransform/>
								</TransformGroup>
							</Path.RenderTransform>
						</Path>
					</Grid>
				</Border>
			</Grid>
            
            <!-- BUTTONS -->
			<StackPanel Margin="35,15,35,0" VerticalAlignment="Top" Grid.Row="1" d:LayoutOverrides="GridBox">
				<TextBlock HorizontalAlignment="Left" FontFamily="Trebuchet MS" FontSize="17.333" FontWeight="Bold" 
                           Foreground="#FF686868" Text="New Game, choose Difficulty Level..." TextWrapping="Wrap" Margin="7,0,0,10">
					<TextBlock.Effect>
						<DropShadowEffect BlurRadius="1" Color="#FFF1F1F1" Direction="283" ShadowDepth="1"/>
					</TextBlock.Effect>
				</TextBlock>
                
                <!-- EASY BUTTON -->
				<Border Height="55" Background="White" BorderBrush="#FFA5A5A5" BorderThickness="1" CornerRadius="8" 
                        d:LayoutOverrides="Height" Margin="0,0,0,10" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding NewGameCommand, Mode=OneWay}"
								Parameter="Easy"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock HorizontalAlignment="Left" Margin="8,0,0,0" VerticalAlignment="Center" FontFamily="Trebuchet MS" 
                               FontSize="24" Text="Easy" TextWrapping="Wrap"/>
				</Border>
                
                <!-- MEDIUM BUTTON -->
				<Border Height="55" Background="White" BorderBrush="#FFA5A5A5" BorderThickness="1" CornerRadius="8" 
                        d:LayoutOverrides="Height" Margin="0,0,0,10" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding NewGameCommand, Mode=OneWay}"
								Parameter="Medium"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock HorizontalAlignment="Left" Margin="8,0,0,0" VerticalAlignment="Center" FontFamily="Trebuchet MS" 
                               FontSize="24" Text="Medium" TextWrapping="Wrap"/>
				</Border>
                
                <!-- HARD BUTTON -->
				<Border Height="55" Margin="0,0,0,10" Background="White" BorderBrush="#FFA5A5A5" BorderThickness="1" 
                        CornerRadius="8" d:LayoutOverrides="Height" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding NewGameCommand, Mode=OneWay}"
								Parameter="Hard"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock HorizontalAlignment="Left" Margin="8,0,0,0" VerticalAlignment="Center" FontFamily="Trebuchet MS" 
                               FontSize="24" Text="Hard" TextWrapping="Wrap"/>
				</Border>
                
                <!-- EXPERT BUTTON -->
				<Border Height="55" Margin="0,0,0,15" Background="White" BorderBrush="#FFA5A5A5" BorderThickness="1" CornerRadius="8" 
                        d:LayoutOverrides="Height" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding NewGameCommand, Mode=OneWay}"
								Parameter="Expert"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock HorizontalAlignment="Left" Margin="8,0,0,0" VerticalAlignment="Center" FontFamily="Trebuchet MS" 
                               FontSize="24" Text="Expert" TextWrapping="Wrap"/>
				</Border>
                
				<TextBlock HorizontalAlignment="Left" FontFamily="Trebuchet MS" FontSize="17.333" FontWeight="Bold" 
                           Foreground="#FF686868" Text="Save/Restore Game" TextWrapping="Wrap" Margin="7,0,0,10">
					<TextBlock.Effect>
						<DropShadowEffect BlurRadius="1" Color="#FFF1F1F1" Direction="283" ShadowDepth="1"/>
					</TextBlock.Effect>
				</TextBlock>
                
                <!-- SAVE BUTTON -->
				<Border Height="55" Margin="0,0,0,10" Background="White" BorderBrush="#FFA5A5A5" BorderThickness="1" 
                        CornerRadius="8" d:LayoutOverrides="Height" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding SaveGameCommand, Mode=OneWay}" 
                                                             ManageEnableState="True"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock HorizontalAlignment="Left" Margin="8,0,0,0" VerticalAlignment="Center" FontFamily="Trebuchet MS" 
                               FontSize="24" Text="Save Current Game" TextWrapping="Wrap"/>
				</Border>
                
                <!-- RESTORE BUTTON -->
				<Border Height="55" Margin="0,0,0,10" Background="White" BorderBrush="#FFA5A5A5" BorderThickness="1" 
                        CornerRadius="8" d:LayoutOverrides="Height" Cursor="Hand">
					<i:Interaction.Triggers>
						<i:EventTrigger EventName="MouseLeftButtonUp">
							<n:ExecuteCommandAction Command="{Binding RestoreGameCommand, Mode=OneWay}" 
                                                             ManageEnableState="True"/>
						</i:EventTrigger>
					</i:Interaction.Triggers>
					<TextBlock HorizontalAlignment="Left" Margin="8,0,0,0" VerticalAlignment="Center" FontFamily="Trebuchet MS" 
                               FontSize="24" Text="Restore Saved Game" TextWrapping="Wrap"/>
				</Border>
			</StackPanel>
		</Grid>
        
        <!-- USER INPUT PANEL -->
		<Border x:Name="boxValueBorder" Opacity="0" Visibility="Collapsed">
			<Border.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#CC000000" Offset="1"/>
					<GradientStop Color="#7AFFFFFF"/>
				</LinearGradientBrush>
			</Border.Background>
            
            <!-- BUTTONS -->
			<Border x:Name="border1" BorderBrush="#FF2C2C2C" BorderThickness="2" Width="300" Height="330" 
                    Cursor="Hand" RenderTransformOrigin="0.5,0.5">
				<Border.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.8" ScaleY="0.8"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Border.RenderTransform>
				<Border.Effect>
					<DropShadowEffect ShadowDepth="0" BlurRadius="48"/>
				</Border.Effect>
				<Grid>
					<Grid.RowDefinitions>
						<RowDefinition Height="0.25*"/>
						<RowDefinition Height="0.25*"/>
						<RowDefinition Height="0.24*"/>
						<RowDefinition Height="0.25*"/>
					</Grid.RowDefinitions>
					<Grid.ColumnDefinitions>
						<ColumnDefinition/>
						<ColumnDefinition/>
						<ColumnDefinition/>
					</Grid.ColumnDefinitions>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="One" Background="{StaticResource BrushLightBlueBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="1" TextWrapping="Wrap"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Column="1"
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Two" Background="{StaticResource BrushLightBlueBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="2" TextWrapping="Wrap"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Column="3" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Three" Background="{StaticResource BrushLightBlueBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="3" TextWrapping="Wrap"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Row="1" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Four" Background="{StaticResource BrushLightBlueBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="4" TextWrapping="Wrap"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Column="1" Grid.Row="1" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Five" Background="{StaticResource BrushLightBlueBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="5" TextWrapping="Wrap"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Column="3" Grid.Row="1" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Six" Background="{StaticResource BrushLightBlueBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="6" TextWrapping="Wrap"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Row="2" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Seven" Background="{StaticResource BrushLightBlueBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="7" TextWrapping="Wrap"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Column="1" Grid.Row="2" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Eight" Background="{StaticResource BrushLightBlueBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="8" TextWrapping="Wrap"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Column="3" Grid.Row="2" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="Nine" Background="{StaticResource BrushLightBlueBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="48" Foreground="White" 
                                   Text="9" TextWrapping="Wrap"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Row="3" Margin="0,0,-30,0" 
						MouseLeftButtonUp="OnSelectBoxValue" Tag="None" Background="{StaticResource RedBrushBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="21.333" Foreground="White" 
                                   Text="Clear" TextWrapping="Wrap"/>
					</Border>
					<Border BorderBrush="#FF909090" BorderThickness="0,0,0.5,0.5" Grid.Column="3" Grid.Row="3" 
						Margin="-69,0,0,0" MouseLeftButtonUp="OnSelectBoxValue" Tag="" Background="{StaticResource GreenBrushBkgBrush}">
						<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="21.333" Foreground="White" 
                                   Text="Cancel" TextWrapping="Wrap"/>
					</Border>
				</Grid>
			</Border>
		</Border>
        
        <!-- MESSAGE PANEL -->
		<Border x:Name="messageBorder" Opacity="0" Visibility="Collapsed">
			<Border.Background>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#E5000000" Offset="0.996"/>
					<GradientStop Color="#99FFFFFF"/>
				</LinearGradientBrush>
			</Border.Background>
			<Border x:Name="border" HorizontalAlignment="Center" VerticalAlignment="Center" Width="285" BorderThickness="1" 
                    CornerRadius="8" MaxHeight="450" RenderTransformOrigin="0.5,0.5">
				<Border.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="0.8" ScaleY="0.8"/>
						<SkewTransform/>
						<RotateTransform/>
						<TranslateTransform/>
					</TransformGroup>
				</Border.RenderTransform>
				<Border.Effect>
					<DropShadowEffect BlurRadius="31" ShadowDepth="0"/>
				</Border.Effect>
				<Border.BorderBrush>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FF393535" Offset="1"/>
						<GradientStop Color="#FF949494" Offset="0.021"/>
					</LinearGradientBrush>
				</Border.BorderBrush>
				<Border.Background>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#BF29292E" Offset="0.996"/>
						<GradientStop Color="#A5CEE3F8" Offset="0.008"/>
					</LinearGradientBrush>
				</Border.Background>
				<Grid>
                    
                    <!-- MESSAGE -->
					<TextBlock x:Name="messageText" Margin="12,8,12,65" VerticalAlignment="Top" FontFamily="Arial" 
                               FontSize="21.333" Foreground="White" Text="The puzzle has not been completely solved." TextWrapping="Wrap"/>
                    
                    <!-- OK BUTTON -->
					<Border BorderThickness="1,1,1,1.5" BorderBrush="{StaticResource ButtonBorderBrush}" 
						Background="{StaticResource ButtonBkgBrush}" CornerRadius="4" Cursor="Hand" 
						Margin="8,0,0,10" Height="36" HorizontalAlignment="Center" VerticalAlignment="Bottom" 
						Width="104" MouseLeftButtonUp="OnMessageClose">
						<TextBlock HorizontalAlignment="Center" Margin="15,0" VerticalAlignment="Center" FontFamily="Arial" 
                                   FontSize="18.667" Foreground="White" Text="Ok" TextWrapping="Wrap">
							<TextBlock.Effect>
								<DropShadowEffect BlurRadius="1" Color="#FF040608" ShadowDepth="1"/>
							</TextBlock.Effect>
						</TextBlock>
					</Border>
                    
				</Grid>
                
			</Border>
		</Border>
		<Orktane_Samples_Sudoku_Controls:WorkingIndicator/>
	</Grid>
</UserControl>